package router

import (
	"tosServer/docs"

	"github.com/spf13/viper"
	swaggerFiles "github.com/swaggo/files"
	ginSwagger "github.com/swaggo/gin-swagger"
)

func (r *Route) docs() {
	docs.SwaggerInfo.Host = "127.0.0.1:" + viper.Get("port").(string)
	docs.SwaggerInfo.Title = "其他服务 author(lmcc)"
	docs.SwaggerInfo.BasePath = "/api"
	r.httpRouter.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
}
